<template>
	<view class="private-school-msg">
		<view class="item">
			<text>私塾名称:</text><text class="item-msg">{{privateSchool.classroom_name}}</text>
		</view>
		<view class="item">
			<text>私塾账号:</text><text class="item-msg">{{privateSchool.phone}}</text>
		</view>
		<!-- <view class="item">
			<text>私塾密码:</text><text class="item-msg">{{privateSchool.phone.substring(privateSchool.phone.length-4)}}</text>
		</view> -->
		<navigator :url="'./qrCode?classroom_id=' + this.classroom_id">

			<view class="item qr-code">
				<text>我的二维码</text>
				<view class="icons">
					<text class="iconfont iconerweima icon-margin"></text>
					<text class="iconfont iconfanhui"></text>
				</view>
			</view>
		</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				classroom_id: '',
				privateSchool: {}
			}
		},
		onLoad(e) {
			this.classroom_id = e.classroom_id
			this.getPrivateSchool()
		},
		methods: {
			getPrivateSchool() {
				this.$zapi.apiPost('user/Grade.User/ClassRoomDetail', {
					classroom_id: this.classroom_id
				}).then(res => {
					if (res.data.code == 200) {
						this.privateSchool = res.data.data
						console.log(this.privateSchool)
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.private-school-msg {
		width: 690upx;
		margin: 0 auto;

		.item {
			padding: 30upx 0 32upx 0;
			font-size: 32upx;
			color: #333;
			border-bottom: 1px solid #E5E5E5;

			.item-msg {
				padding-left: 20upx;
			}
		}

		.qr-code {
			display: flex;
			justify-content: space-between;

			.icon-margin {
				margin-right: 34upx;
				font-size: 30upx;
			}

			.iconfanhui {
				font-size: 14upx;
			}
		}
	}
</style>
